<template>
    <div class="insure">
        <x-header v-show="!isWeChar">
            <div slot="default" class="common__header--title">填写投保单</div>
            <div @click="goBack" slot="overwrite-left"><img slot="icon" src="~assets/x3/ico/goback1.png" class="go-back"></div>
        </x-header>
        <!-- 投保人信息 -->
        <group class="insure__formPolicy--group">
            <cell>
                <span class="insure__list--title" slot="after-title">
                    <span class="insure__iconspan"></span>
                    <span class="insure__iconspan--title">快捷投保</span>
                </span>
            </cell>

            <div class="insure__formPolicy">
                <div>
                    <x-input placeholder="姓名" class="base-input_font" id="testDemo" v-model="appliDto.name" :min="2" :max="10" required>
                        <div class="insure__input " slot="label">
                            <img src="~assets/x3/ico/icon-name.png" class="icon-img">&nbsp&nbsp
                            <!-- 姓名&nbsp -->
                        </div>
                    </x-input>
                    <x-input class="base-input_font" placeholder="证件号码" :max="18" v-model="appliDto.idNum" @on-blur="isShowintegralMe" required>
                        <div class="insure__input" slot="label">
                            <!-- 证件号码&nbsp -->
                            <img src="~assets/x3/ico/icon-card.png" class="icon-img">&nbsp&nbsp
                        </div>
                    </x-input>
                    <!-- 日期必选项同步 -->

                    <x-input class="base-input_font" placeholder="手机号码  (收取短信通知)" v-model="appliDto.phoneNum" :min="9" :max="11" keyboard="number" required>
                        <div class="insure__input" slot="label">
                            <img src="~assets/x3/ico/icon-tel.png" class="icon-img">&nbsp&nbsp
                        </div>
                    </x-input>
                    <x-input class="base-input_font" v-model="appliDto.mailAddress" :max="64" placeholder="电子邮件  (收取电子保单)" is-type="email" required>
                        <div class="insure__input" slot="label">
                            <img src="~assets/x3/ico/icon-email.png" class="icon-img">&nbsp&nbsp
                        </div>
                    </x-input>
                    <x-input class="car-input base-input_font" :readonly="isNewCar" placeholder="车牌号" :max="7" @on-blur="queryVin()" v-model="appliDto.carLicenseNum" required>
                        <div class="insure__input" slot="label">
                            <!-- 证件号码&nbsp -->
                            <img src="~assets/x3/ico/icon-card.png" class="icon-img">&nbsp&nbsp
                        </div>
                        <!-- <div class="insure__input" slot="right"> -->
                        <!-- 证件号码&nbsp -->
                        <check-icon class="insure__input" slot="right" :value.sync="isNewCar">未上牌新车</check-icon>
                        <!-- </div> -->
                    </x-input>
                    <x-input class="car-input base-input_font" v-model="appliDto.carFrameNum" :max="17" placeholder="车架号" required>
                        <div class="insure__input" slot="label">
                            <img src="~assets/x3/ico/icon_carNum.png" class="icon-img">&nbsp&nbsp
                        </div>
                    </x-input>
                </div>
            </div>
        </group>

        <div class="common__footer common__clause">
            <span @click="confirmItem">
                <img v-show="isCheck" class="insure__img" src="~assets/x3/ico/check.png">
                <img v-show="!isCheck" class="insure__img" src="~assets/x3/ico/check_un.png">
                <!-- <input type="checkbox" id="sure" value="sure" style="vertical-align:middle; margin-top:0;"> -->
                <span class="insure__sure">已阅读并同意使用</span>
            </span>
            <span @click="clauseRead('statement')" class="insure__protocol">《投保声明》</span>
            <span @click="clauseRead('notice')" class="insure__protocol">《理赔须知》</span>
            <span @click="getClause()" class="insure__protocol">《保险条款》</span>
        </div>
        <div class="insure__footer">
            <div class="insure__leftbtn">¥
                <span>{{curprice}}</span>
            </div>
            <div @click="goPolicy" class="insure__rightbtn">提交</div>
        </div>
        <!-- <sele-country></sele-country> -->
        <!-- 投保声明  理赔须知 -->
        <x-dialog v-model="showClauseRead" class="dialog-Einv" hide-on-blur>
            <div style="padding:10px">
                <div class="insure__clauseRead" style="overflow-y: overlay;">
                    <p align="left" v-html="readText"></p>
                </div>
            </div>
            <div>
                <x-button style="width: 100px !important;" @click.native="showClauseRead=false" mini type="primary">确认</x-button>
                <!-- <x-button mini>取消</x-button> -->
            </div>
        </x-dialog>

        <actionsheet class="insure__actionsheet" v-show="isShowCarSele" v-model="isShowCarSele">
            <div slot="header">
                <car-Attributively @closeCarSele="closeCarSele"></car-Attributively>
            </div>
        </actionsheet>
    </div>
</template>

<script>
import CarAttributively from "src/components/CarAttributively";
import { RequestUrl } from "src/common/url";
import Config from "src/common/config/insureConfig";
import {
    Mutations,
    Gender,
    PerIdentifyType,
    EntIdentifyType,
    benefType,
    insuredidentity,
    intervalTime,
    RouteUrl
} from "src/common/const";
import {
    XHeader,
    Group,
    Cell,
    XInput,
    Datetime,
    XSwitch,
    Selector,
    XButton,
    XDialog,
    CellFormPreview,
    Actionsheet,
    TransferDom,
    Toast,
    CheckIcon
} from "vux";
import Validation from "src/common/util/validation";
import DateUtil from "src/common/util/dateUtil";
import { mapState, mapActions } from "vuex";
export default {
    components: {
        CellFormPreview,
        XDialog,
        Selector,
        XHeader,
        Group,
        Cell,
        XInput,
        Datetime,
        XSwitch,
        XButton,
        Actionsheet,
        TransferDom,
        Toast,
        CheckIcon,
        CarAttributively
    },
    computed: mapState({
        // insure: "insure",
        isLoading: "isLoading",
        user: "user",
        axtx: "axtx",
        saveInsure: "saveInsure",
        detailsStore: "detailsStore",
        isWeChar: "isWeChar",
        carAddr: "carAddr",
        shareData: "shareData",
        initIndexData: "initIndexData",
        accessUrl: "accessUrl",
        dealUid: "dealUid"
    }),
    data() {
        return {
            showClauseRead: false,
            readText: "",
            appliDto: {
                //投保人信息
                name: "",
                idNum: "",
                phoneNum: "",
                mailAddress: "",
                carLicenseNum: "",
                carFrameNum: "",
                stringDate: "",
                noLicenseNum: false,
                planCode: "",
                sumPremium: "",
                saleCode: "",
                salerName: "",
                agreementCode: "",
                riskCode: "",
                seatNum: "",
                isNewCar: false,
                endTime: "",
                sex: "",
                birth: "",
            },
            saveCarNum: "",
            isCheck: false,
            curprice: 0,
            deadLine: "",
            isNewCar: false,
            isShowCarSele: false,
            // defaultMen: "法定受益人"
        };
    },
    watch: {
        'appliDto.carFrameNum': {
            handler(cur, old) {
                if (cur.indexOf('*') > 0 && typeof (this.axtx.maskVin[cur]) == "undefined") {
                    this.appliDto.carFrameNum = "";
                }
            }
        },
        isNewCar(cur, old) {
            if (cur) {
                this.isShowCarSele = true;
                this.saveCarNum = this.appliDto.carLicenseNum;
                this.appliDto.isNewCar = cur;
                if (this.appliDto.carFrameNum.indexOf('*') > 0) {
                    this.appliDto.carFrameNum = "";
                }
            }
            if (old) {
                this.appliDto.carLicenseNum = this.saveCarNum;
            }
        },
        isShowCarSele(cur, old) {
            if (!cur) {
                // debugger
                this.appliDto.carLicenseNum = this.carAddr;
            }
        },
        showClauseRead(cur, old) {
            if (cur) {
                $("body").css("overflow-y", "hidden");
            } else {
                $("body").css("overflow-y", "auto");
            }
        },
    },
    filters: {
        filNumber(val) {
            if (val == "1") {
                return "";
            }
            return val;
        }
    },
    methods: {
        queryVin() {
            this.$common.storeCommit(this, Mutations.AXTX_GET_VIN, this);
        },
        isShowintegralMe(val) {
            let query = {
                _this: this,
                idCar: val,
                isIdCarGet: false,
                type: "axtx"
            }
            this.$common.storeCommit(this, Mutations.APPLI_FIND_ID_CAR, query);
            if (this.saveInsure.refereeData != false) {
                let refUserDto = this.saveInsure.refereeData;
                if (val == refUserDto.idNumber && !this.isShowintegral && refUserDto.storeFlag == "1" && (refUserDto.userType == "1" || refUserDto.userType == "2" || refUserDto.userType == "5")) {
                    this.isShowintegral = true;
                    return this.showErrorMsg("积分用户投保人和被保人为自己并不会获得宝豆！", true);
                }
            } else {
                if (this.user.isLogin) {
                    let refUserDto = this.user.userDto;
                    if (val == refUserDto.idNumber && !this.isShowintegral && refUserDto.storeFlag == "1" && (refUserDto.userType == "1" || refUserDto.userType == "2" || refUserDto.userType == "5")) {
                        this.isShowintegral = true;
                        return this.showErrorMsg("积分用户投保人和被保人为自己并不会获得宝豆！", true);
                    }
                }
            }
        },
        closeCarSele() {
            this.isShowCarSele = false;
        },
        getClause() {
            // let iframe = {
            //     isIframe: true,
            //     iframeUrl: "https://uat-lm.libertymutual.com.cn/admin-sale/file/20171107161503.pdf",
            //     iframeName: "保险条款",
            //     _this: this
            // };
            // this.$store.commit(Mutations.FOOTER_SHOW, FooterShow.FALSE);
            // this.$store.commit(Mutations.SET_IFRAME_DATA, iframe);
            // this.$common.downloadfile(this.detailsStore.curSelePlan.clauseUrl, "保险条款", this);
            let query = {
                // clauseTitle: this.detailsStore.curSelePlan.clauseContent,
                _this: this,
                planId: this.detailsStore.curSelePlan.planId
            }
            this.$common.storeCommit(this, Mutations.CUR_CLAUSE_TITLE_LIST, query);


        },
        clauseRead(type) {
            if (type == "notice") {
                this.readText = this.detailsStore.curSelePlan.notice;
            } else {
                this.readText = this.detailsStore.curSelePlan.statement;
            }
            this.showClauseRead = true;
        },
        valCellInput() {
            $(".weui-input").focus();
            $(".weui-input").blur();
        },
        //是否勾选了同意项目
        confirmItem() {
            this.isCheck = !this.isCheck;
        },
        //点击提交 触发
        goPolicy() {
            let _this = this;
            this.valCellInput();
            this.saveData();
            if (!this.isCheck) {
                this.$vux.alert.show({ content: this.$common.alertMsg("请勾选并阅读条款", "red;") });
                setTimeout(() => {
                    this.$vux.alert.hide();
                }, 3000);
            } else {
                this.appliDto.name = this.appliDto.name.trim();
                this.appliDto.idNum = this.appliDto.idNum.trim();
                if (this.baseVali() && this.curprice != 0) {
                    // let parm = {
                    //     _this: this,
                    //     user: this.user,
                    //     curNsSelePlan: this.detailsStore.curNsSelePlan
                    // }
                    // this.$common.storeCommit(this, Mutations.SET_COMMIT_INSURE_DATA, parm);
                    this.appliDto.sex = Validation.getGenderByidCardNumber(this.appliDto.idNum);
                    this.appliDto.birth = Validation.getBirthByidCardNumber(this.appliDto.idNum);
                    let parm = {
                        _this: this,
                        user: this.user,
                        curNsSelePlan: this.detailsStore.curNsSelePlan
                    }
                    this.$common.storeCommit(this, Mutations.SET_AXTX_AGR, parm);

                    let userId = "";
                    if (this.user.isLogin) {
                        userId = this.user.userDto.userCode;
                    }
                    let refereeId = "";
                    if (this.saveInsure.refereeData != false) {
                        refereeId = this.saveInsure.refereeData.userCode
                    }

                    this.appliDto.stringDate = this.detailsStore.productData[this.saveInsure.indexData.id].startTime;
                    this.appliDto.endTime = this.detailsStore.productData[this.saveInsure.indexData.id].endTime;
                    this.appliDto.sumPremium = this.curprice;
                    this.appliDto.planCode = this.detailsStore.curNsSelePlan.planIcpcode;

                    if (this.detailsStore.curSelePlan.planName.indexOf("5") > -1) {
                        this.appliDto.seatNum = "5";
                    } else {
                        this.appliDto.seatNum = "7";
                    }

                    if (refereeId == userId) {
                        refereeId = "";
                    }
                    let queryAxtx = JSON.parse(JSON.stringify(this.appliDto));
                    // toLocaleUpperCase 
                    // this.appliDto.carFrameNum = this.appliDto.carFrameNum.toLocaleUpperCase();
                    // this.appliDto.carLicenseNum = this.appliDto.carLicenseNum.toLocaleUpperCase();

                    if (queryAxtx.carFrameNum.indexOf('*') > 0 && typeof (this.axtx.maskVin[queryAxtx.carFrameNum]) != 'undefined' && typeof (this.axtx.vinList[queryAxtx.carLicenseNum]) != 'undefined') {
                        queryAxtx.carFrameNum = this.axtx.vinList[queryAxtx.carLicenseNum];
                    }
                    if (Validation.isIdNumber(queryAxtx.idNum)) {
                        queryAxtx.identifyType = "01";
                    } else {
                        queryAxtx.identifyType = "99";
                    }
                    queryAxtx.carFrameNum = queryAxtx.carFrameNum.toLocaleUpperCase();
                    queryAxtx.carLicenseNum = queryAxtx.carLicenseNum.toLocaleUpperCase();
                    let insureQuery = {
                        accessUrl: "<br>" + this.accessUrl + "<br>ver:" + localStorage["version"] + "<br>INSURE_TIME:" + DateUtil.getNowDateStr_Ymdhm(new Date()) + "  <br>userId:" + userId + "  -refId:" + refereeId + "<br>browser:" + localStorage["BOTYPE"] + "<br>isWeChar:" + this.isWeChar + "<br>ACC_LOG:" + sessionStorage["ACC_LOG"],
                        city: this.initIndexData.region,
                        shareUid: this.saveInsure.shareUid,
                        planId: this.detailsStore.curNsSelePlan.planId,
                        risk: this.detailsStore.curNsSelePlan.proCode,
                        riskName: this.saveInsure.indexData.productType,
                        productId: this.saveInsure.indexData.id,
                        branchCode: this.saveInsure.hotArea.branchCode,
                        proRiskCode: this.saveInsure.indexData.riskCode,
                        refereeId: refereeId,
                        productName: this.saveInsure.indexData.productCname,
                        amount: this.curprice,
                        clauseUrl: this.detailsStore.curSelePlan.clauseUrl,
                        planName: this.detailsStore.curSelePlan.planName,
                        deadLine: this.detailsStore.curSelePlan.maxDeadLine,
                        minAge: this.detailsStore.curSelePlan.minAge,
                        successfulUrl: this.shareData.successfulUrl,
                        callBackUrl: this.shareData.callBackUrl,
                        singleMember: this.shareData.singleMember,
                        isHotArea: this.saveInsure.isHotArea,
                        areaCode: this.saveInsure.areaCode,
                        channelName: this.saveInsure.channelName,
                    }
                    let request = {
                        insureQuery: insureQuery,
                        axtx: queryAxtx,   // ---
                        hotarea: this.saveInsure.hotArea,  // ---
                        kinds: this.detailsStore.curNsSelePlan.kinds,  // ---
                        // planName:
                        user: {   // ---
                            userCode: userId
                        },
                    };
                    if (!this.isLoading && !this.detailsStore.isPlanQuery) {
                        // let dataSave = {
                        //     loading: false,
                        //     res: {},
                        //     curprice: this.curprice
                        // };
                        // _this.$common.storeCommit(
                        //     _this,
                        //     Mutations.INSURE_RES_DATA_AXTX,
                        //     dataSave
                        // );
                        this.$common.goUrl(this, RouteUrl.INSURE_CONFIRM_AXTX);
                        _this.$http.post(RequestUrl.AXTX_INSURE, request).then(function (res) {
                            let alertData = "";
                            let isAlert = false;
                            if (res.success && res.result.status == true && res.result.proposalSaveResponseDto.responseHeadDto.osbMessage.indexOf('成功') > -1) {
                                // let responseJson = JSON.parse(res.result.responseJson);
                                // if (responseJson.success == "true") {
                                let dataSave = {
                                    loading: true,
                                    res: res,
                                    curprice: _this.curprice
                                };
                                _this.$common.storeCommit(
                                    _this,
                                    Mutations.INSURE_RES_DATA_AXTX,
                                    dataSave
                                );
                                // } else {
                                //     isAlert = true;
                                //     alertData = responseJson.message;
                                // }
                            } else {
                                isAlert = true;
                                if (!res.success) {
                                    alertData = res.result;
                                }
                                // alertData = res.result;
                                // alertData = res.result;
                            }
                            if (isAlert) {
                                // alertData = "投保失败，请稍后再试！";
                                // if (alertData == "undefined" || alertData == null || alertData == "") {
                                //     alertData = "投保失败,错误10,请稍后再试！";
                                // }
                                try {
                                    if (typeof (alertData) == "object") {
                                        if (alertData.proposalSaveResponseDto.responseHeadDto.osbResult == "1" && typeof (alertData.proposalSaveResponseDto.responseHeadDto.osbMessage) != "undefined") {
                                            alertData = alertData.proposalSaveResponseDto.responseHeadDto.osbMessage;
                                        }
                                    }
                                } catch (error) {
                                    alertData = "投保失败,错误10,请稍后再试！";
                                }

                                if (alertData == "undefined" || alertData == null || alertData == "" || typeof (alertData) == "object" || alertData == "null") {
                                    alertData = "投保失败,错误10,请稍后再试！";
                                }
                                _this.$vux.alert.show({
                                    content: _this.$common.alertMsg(alertData, "red;"), onHide() {
                                        if (alertData.substring(0, 4) == "0005") {
                                            _this.$common.goBackUrl(_this, RouteUrl.INSURE_AXTX);
                                        }
                                    }
                                });
                            }



                        });
                    }
                }
            }
        },
        baseVali() {
            if (Validation.isEmpty(this.appliDto.name)) {
                return this.showErrorMsg("姓名不能为空！");
            }
            if (Validation.isEmpty(this.appliDto.idNum)) {
                return this.showErrorMsg("证件号码不能为空！");
            } else {
                if (this.appliDto.idNum.length == 18) {
                    if (!Validation.isIdNumber(this.appliDto.idNum)) {
                        return this.showErrorMsg("证件号不是有效身份证号");
                    }
                }
            }
            if (Validation.isEmpty(this.appliDto.mailAddress)) {
                return this.showErrorMsg("邮箱不能为空！");
            } else {
                if (!Validation.isEmail(this.appliDto.mailAddress.toLowerCase())) {
                    return this.showErrorMsg("投保邮箱格式不正确");
                }
            }
            let msg = Validation.isPhone11(this.appliDto.phoneNum);
            if (msg != null) {
                return this.showErrorMsg("投保" + msg);
            }
            if (!this.isNewCar) {
                if (Validation.isEmpty(this.appliDto.carLicenseNum)) {
                    return this.showErrorMsg("车牌号不能为空！");
                } else {
                    let reg = /^[\u4e00-\u9fa5][a-zA-Z0-9]{6}$/;
                    if (reg.test(this.appliDto.carLicenseNum) === false) {
                        return this.showErrorMsg("车牌号格式错误，请重新输入！");
                    }
                    if (this.appliDto.carLicenseNum.substring(0, 1) === '军' || this.appliDto.carLicenseNum.substring(0, 1) === '警') {
                        return this.showErrorMsg("车牌号不能包含 [军、警]！");
                    }
                }
            }
            if (Validation.isEmpty(this.appliDto.carFrameNum)) {
                return this.showErrorMsg("车架号不能为空！");
            }

            return true;
        },
        goBack() {
            this.$common.goBackUrl(this, RouteUrl.DETAILS);
            // this.$common.goBack(this);
        },
        saveData() {
            this.appliDto.isNewCar = this.isNewCar;
            this.$common.storeCommit(this, Mutations.AXTX_SAVE_DATA, this.appliDto);
        },
        setData() {
            this.$common.storeCommit(this, Mutations.AXTX_GET_DATA, this);
        },
        showErrorMsg(errorMsg, type) {
            this.$vux.alert.show({ content: this.$common.alertMsg(errorMsg, "red;") });
            if (type) {
                return false;
            } else {
                setTimeout(() => {
                    this.$vux.alert.hide();
                }, 3000);
                return false;
            }
        },

    },
    beforeRouteEnter(to, from, next) {
        sessionStorage["INSURE_FORM_URL"] = from.path;
        next();
    },
    beforeMount() {
        // alert(typeof (sessionStorage["test"]));
        // if (sessionStorage["INSURE_FORM_URL"] == "/"&&typeof (sessionStorage["INSURE_DATA"])!="undefined") {

        // }else 
        if (sessionStorage["INSURE_FORM_URL"] == "/") {
            this.$common.goUrl(this, RouteUrl.DETAILS);
        }
    },
    beforeDestroy() {
        // alert("insure beforeDestroy");
        // let parm = {
        //     curprice: this.curprice,
        //     seleCountry: this.seleCountry
        // };
        // this.$common.storeCommit(this, Mutations.INSURE_CURPRICE, parm);
        this.saveData();
        let localSaveData = {
            // index:
        }
    },
    mounted() {
        sessionStorage["ACTIVITY_BACK_URL"] = RouteUrl.INSURE;
        document.title = '填写投保单';
        //初始化，没有footer
        this.$init.subPageInit(this);
        let _this = this;

        this.curprice = this.detailsStore.curNsSelePlan.planPrice;
        let dataSave = {
            loading: false,
            res: {},
            curprice: this.curprice
        };
        _this.$common.storeCommit(
            _this,
            Mutations.INSURE_RES_DATA_AXTX,
            dataSave
        );

        // window.addEventListener('load', function() {
        //     _this.saveData();
        // });
        // window.addEventListener('popstate', function(ev) {
        //     _this.saveData();
        // });

        //添加上一个页面的价钱


        this.setData();

        // this.isNewCar = this.appliDto.isNewCar;

        setTimeout(() => {
            _this.isShowCarSele = false;
        }, 10);

    }
};
</script>
<style  lang="scss">
.radio-check {
  label {
    vertical-align: middle;
  }
}

.common__clause {
  margin-bottom: 50px;
}

.insure__iconspan {
  position: absolute;
  margin-top: 4px;
  width: 4px;
  height: 18px;
  background-color: #c8161d;
}

.insure__list--title {
  font-size: 15px;
  color: #c8161d;
}

.insure__iconspan--title {
  margin-left: 9px;
  font-size: 14px;
}

.insure__formPolicy {
  border: 1px solid #e7e7e7;
  margin: 0 18px;
}

.insure__formPolicy--group {
  .vux-no-group-title {
    padding-bottom: 20px;
  }
}

.insure__footer {
  position: fixed;
  bottom: 0px;
  z-index: 5;
  width: 100%;
  height: 47px;
  background-color: white;
  div {
    height: 100%;
    line-height: 47px;
    text-align: center;
    font-size: 20px;
  }
  box-shadow: 0px 0px 10px 1px #efefef;
}
.car-input {
  .weui-cell__bd {
    input {
      text-transform: uppercase;
    }
  }
}
.insure__leftbtn {
  float: left;
  width: 35%;
  background: #fff;
  color: #c8161d;
  span {
    color: #f6690a;
  }
}

.insure__rightbtn {
  background: #c8161d;
  color: #fff;
}

.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.3s;
}

.fade-enter,
.fade-leave-to {
  transition: opacity 0.1s;
}

.insure__red {
  color: red;
}

.insure__green {
  color: green;
}

.insure__policyHolderType {
  font-size: 12px;
  color: #7f7f7f;
}

// .weui-input {
//     color: #000 !important;
// }
.insure__middle {
  display: initial;
  vertical-align: super;
}

.insure__input {
  line-height: 0px;
  font-size: 14px;
  color: #7f7f7f !important;
  .weui-cell__ft {
    text-align: justify;
    color: #999999;
  }
}

.weui-label {
  font-size: 14px;
  color: #7f7f7f;
}

input::-webkit-input-placeholder {
  font-size: 14px;
  color: #7f7f7f;
}

.insure__img {
  width: 15px;
  vertical-align: middle;
}

.insure__sure {
  vertical-align: middle;
}

.insure__protocol {
  vertical-align: middle;
  color: #c8161d;
}

.insure__radio {
  display: inline-flex;
}

.insure__input--Bene {
  color: #000;
  font-size: 15px;
}

.insure__iconspan--delete {
  font-size: 12px;
  color: #c8161d;
  border: 1px solid #c8161d;
  border-radius: 5px;
  padding: 2px;
  float: right;
  margin-right: 8px;
}

.insure__base--padding {
  padding-bottom: 20px;
}

.insure__clauseRead {
  border-color: aliceblue;
  white-space: pre-wrap;
  vertical-align: top;
  width: 100%;
  font-size: 15px;
  height: 75vh;
  font-family: Microsoft YaHei;
  overflow-y: scroll; // border: 1px solid #f3f3f3;
  font: 400 14.3333px Arial;
}

.dialog-Einv {
  // padding: 15px !important;
  .weui-dialog {
    max-width: 90% !important;
  }
}

.insure_sele {
  .weui-cell__bd {
    .weui-select {
      height: 20px;
      line-height: 20px; // padding-left: 0px;
      padding-left: 10px;
    }
  }
  .weui-cell__bd::after {
    right: -9px !important;
  }
}

.weui-form-preview__label {
  margin-right: 0em !important;
}

.insure__actionsheet {
  .weui-actionsheet__cell {
    padding: 0px !important;
    text-align: unset !important;
  }
}
</style>
